<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

<ui:composition template="templates/unrestricted.xhtml">
    <ui:define name="title">JEE6 Sort page</ui:define>
    
    <ui:define name="content">


        <h:form>

            <h:outputText value="#{sorter.greet.greet}"/>
            <h:inputText value="#{sorter.collector.text}"/>

            <h:commandButton value="add"/><br/>
            <h:commandButton value="sort (ajax)" action="#{sorter.sort}">
                <f:ajax event="action" execute="@form" render="out"/>
            </h:commandButton><br/>
            Added : <h:outputText value="#{sorter.collector.addedText}"/> <br/>
            <h:outputText value="#{sorter.collector.sortedText}" id="out"/>
        </h:form>

    </ui:define>

</ui:composition>
</html>